<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>重新实现vue部分双向绑定功能</title>
		<script src="ivue.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.number{
				color: red;
				font-weight: bold;
				font-size: 30px;
			}
		</style>
	</head>

	<body>
		<p><a href="http://web.jobbole.com/94386/">http://web.jobbole.com/94386/</a></p>
		<p>重新实现vue部分双向绑定功能</p>
		<p>实现指令：</p>
		<ul>
			<li>iv-model</li>
			<li>iv-bind</li>
			<li>iv-click</li>
		</ul>
		<div id="app">
			<form>
				<input type="text" iv-model="number"/>
				<input type="button" iv-click="increment" value="add"/>
			</form>
			<p>number : <span class="number" iv-bind="number"></span></p>
		</div>
		<script type="text/javascript">
			var app = new iVue({
				el:'#app',
				data:{
					number:666
				},
				methods:{
					increment(e){
						this.number+=1;
					}
				}
			})
			
		</script>
	</body>

</html>